﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceModel;
using System.Text;
using System.Threading.Tasks;
using Sern.Common;

namespace Sern.Abstracts.Common
{
    public interface IMapReduce<in TKey, in TVal> 
        : IMapReduce
    {
        [OperationContract, UseNetDataContractSerializer]
        void Handle(TKey key, TVal value);

        /////Clear cache etc, batch is completed. There's trade off here, 
        ///// either use a sliding expiration to purge the events, in which case we might have too much or turn the entire project into more of a batch like thing, where things have an end date instead of a continuous stream.
        ///// May be we need both. So the expiration will catch events when the engine is run continously w/o an end date, the end will on the other hand allow the engine to end.
        //void End();
    }

    public interface IMapReduce
    {
        
    }
}
